-
Notifications
You must be signed in to change notification settings - Fork 122
feat: introduce post processors #821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Code Coverage Summary
Diff against main
Results for commit: 1809e65 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
packages/ragbits-agents/src/ragbits/agents/post_processors/base.py
Outdated
Show resolved
Hide resolved
packages/ragbits-agents/src/ragbits/agents/post_processors/base.py
Outdated
Show resolved
Hide resolved
packages/ragbits-agents/src/ragbits/agents/post_processors/base.py
Outdated
Show resolved
Hide resolved
packages/ragbits-agents/src/ragbits/agents/post_processors/base.py
Outdated
Show resolved
Hide resolved
packages/ragbits-agents/src/ragbits/agents/post_processors/base.py
Outdated
Show resolved
Hide resolved
I ran the example and everything worked perfectly! 💪 I think it would also be helpful to add a section about post-processors to our docs. |
raise AgentInvalidPostProcessorError( | ||
reason="Non-streaming post-processors are not allowed when allow_non_streaming is False" | ||
) | ||
generator = self._stream_with_post_processing(input, options, context, tool_choice, post_processors) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make this method a sort of decorator / wrapper, then it won't be required for it to understand internal concepts of agent .run_streaming - it will just iterate over already created generator and add post-processing logic.
With this impl we could also move that logic out of agent to post_processor package
No description provided.